The present invention relates to an image forming device, an image reading device or the like, and particularly to a media detection device including an optical sensor for detecting the presence or absence of a medium such as a recording medium at a predetermined position, or for detecting the width of such medium.
In an image forming device, generally, a medium and its width are detected in a series of initial operations prior to a printing or recording. The detection of a medium and its width is usually performed using an optical sensor which detects the medium in non-contact therewith. In particular, an image forming device such as a printer, a plotter or the like includes a movable carriage on which the optical sensor is mounted to move over a medium such that the medium and its width are detected. After this, it is checked whether a printing or recording is ready to start, and then the subsequent operations are performed.
In a conventional circuit which judges the presence/absence of a medium directly from an output of the optical sensor, a precise detection of the medium is not expected because the sensor output is not stable. Also, because of the uncertain state of the output, there may be a time difference between the actual sensor output timing and the timing as it should be. This will cause a difference between the actual amount of travelling a sheet and the instructed amount thereof, so that a problem will occur that a margin of the sheet varies.
In addition, erroneous operations could occur due to errors in electronic characteristics (difference in dark current) of the optical sensor itself, variation in the detected distance due to mechanical dimensional errors of the sensor, and assembly errors in mounting it on the carriage, as well as the contamination or paper powders attached to the light emitting and receiving parts of the sensor.
Further, in a structure where a medium is detected with the medium placed between the optical sensor and a medium supporting member or platen, additional structure is often employed which comprises a light absorbing member or low light reflectance member which receives infrared light from the light emitting part of the optical sensor in the absence of a medium, or a member adapted to cause the optical sensor to detect the medium""s absence, the member closely placed opposite to the optical sensor. However, in a case where a high sensitive type of optical sensor is employed, or a particular sensor used happened to be highly sensitive, a problem could occur that a presence of a medium is detected in spite of no presence of such medium, and vice-versa, depending on variations in light reflectance (absorptance or transmittance) of the light absorbing or low reflectance member, differences in distance between the member and the optical sensor due to the way of its mounting, differences in the surface treatment or contamination thereof, etc.
An approach to overcome these problems in some of the prior art media detection devices, is to digitize the output signal from an optical sensor through an A/D converter to correct the signal. Alternatively, a structure is known which includes a comparison operation circuit having its non-inverting input terminal applied with the output from an optical sensor and its inverting input terminal connected to a combination of resistors and switching elements. This structure selectively provides a plurality of voltage values to the non-inverting input, based on the combination of the ON""s and OFF""s of the switching elements, so that the switching elements are sequentially turned ON and OFF to catch the ON/OFF states of the switching elements when the comparison operation circuit changes its output, thereby attempting to achieve a precisely detection of the presence or absence of a medium, as shown in Japanese Laid-open (KOKAI) application No. 5-270700.
In any of the foregoing prior art approaches including correcting the sensor output voltage around a threshold, changing the threshold itself, or using a programming to make a series of set-up operations of the ON/OFF states of the switching elements, the optical sensor should actually be activated at least once in each of two states: one with a medium and another with no medium, to recognize and store the output states regarding the presence and absence of the medium in both the two states, and thereafter an actual detecting operation is enabled. Thus, such prior art approaches each require at least twice the medium detections to be performs, resulting in a time-consuming and complicated processing and a significant load on a central processing unit (CPU).
Further, in the case where the presence of a medium is erroneously detected when no medium is present, due to the above-mentioned various factors, the initial setting, per se, of the two states of a medium can not correctly bee performed.
The present invention was made in view of these drawbacks of the prior art to provide a media detection method and device capable of precisely detecting a medium regardless of individual differences of optical sensors, errors in mounting them, or contamination of light emitting and receiving parts thereof, etc.
It is another object of the invention to provide a media detection method and device which enables a setting for precisely detecting a medium even when the medium has not yet provided, and even if the sensor output varies due to aging.
A media detection method according to the present invention is a method using an optical sensor for detecting reflected light of emitted light, and a differential amplifier having a detection signal input terminal for receiving an output of the optical sensor and a reference input terminal for receiving a reference input voltage, to detect a presence of a medium to be detected based on an output from the optical sensor, the method comprising the steps of: obtaining an output of the differential amplifier with the reference input terminal set at 0 volts, the differential amplifier being responsive to an output of the optical sensor when or where no medium is present; applying the obtained output of the differential amplifier to a predetermined formula so as to compute a value of voltage to next be applied to the reference input terminal of the differential amplifier; and when actually detecting a medium, applying the computed value of voltage to the reference input terminal of the differential amplifier while applying the output from the optical sensor to the signal input terminal of the differential amplifier such that the output of the differential amplifier is compared with a predetermined threshold to judge a presence or absence of a medium.
With this method, when actually detecting a medium, it is possible to precisely detect the medium by applying an appropriate reference input terminal voltage to the differential amplifier, against various factors of causing erroneous operations, including the optical sensor and its environment. In addition, only detecting an absent state of a medium prior to an actual media detection operation is sufficient to compute the reference input terminal voltage value, and hence, the media detection operation can quickly be started.
In the media detection method, let a voltage V+i be input to the detection signal input terminal of the differential amplifier, and let a voltage Vxe2x88x92i be input to the reference input terminal, then the output voltage Vo is generally represented by:
Vo=xcex1(V+i xe2x88x92Vxe2x88x92i)
In one embodiment of the invention, it is preferable that the gain xcex1 of the differential amplifier is predetermined such that the output of the differential amplifier is not saturated when the output of the optical sensor, when or where no medium is present, is applied to the detection signal input terminal of the differential amplifier and the reference input terminal is set at 0 volts.
Also, preferably, the predetermined formula determines such a reference input terminal voltage, to next be applied to the differential amplifier, that the output value of the differential amplifier becomes 0 volts in response to the output of the optical sensor when or where no medium is present.
More specifically, the predetermined formula is given by the following:
Vxe2x88x92x =Vox /xcex1
where Vox represents the output of the differential amplifier when the output of the optical sensor, when or where no medium is present, is applied to the detection signal input terminal of the differential amplifier and the reference input terminal is set at 0 volts, and Vxe2x88x92x represents a voltage value to be applied to the reference input terminal such that the output of the differential amplifier, when or where no medium is present, becomes 0 volts.
Thus, the determination of the formula to compute the reference input terminal voltage value does not require any output of the optical sensor in the presence of a medium.
A media detection device according to the present invention, comprises: an optical sensor for detecting reflected light of emitted light; a differential amplifier having a detection signal input terminal for receiving an output of the optical sensor and a reference input terminal for receiving a reference input voltage; means for generating a reference input terminal voltage for the differential amplifier; a control means for obtaining an output of the differential amplifier with the reference input terminal set at 0 volts, the differential amplifier being responsive to an output of the optical sensor when or where no medium is present, and for applying the obtained output of the differential amplifier to a predetermined formula so as to compute a value of voltage to next be applied to the reference input terminal of the differential amplifier; and a judging means for judging a presence or absence of a medium by obtaining an output of the differential amplifier with the computed value of reference input terminal voltage applied to the differential amplifier and the output from the optical sensor applied to the signal input terminal of the differential amplifier such that the output of the differential amplifier is compared with a predetermined threshold.
In this media detection device, the optical sensor can be carried by a carriage which is moved over a medium to be detected. For example, in an image forming device or an image reading device, the optical sensor can be carried by a carriage on which a head is mounted, so as to detect a medium or the dimension of its width, etc.
This detection operation can be carried out at an arbitrary timing, such as immediately after power-on of the device, during an initial operation immediately before the first printing (or reading) operation after the power-on, or when a user wants.
The media detection device may further comprising: an A/D converter for converting an analog output of the differential amplifier into a digital signal; and a storage means for storing the predetermined formula; the control means including a central processing unit (CPU); the means for generating a reference input terminal voltage including a D/A converter; and the CPU obtaining the output of the differential amplifier with the reference input terminal voltage output from the D/A converter, set at 0 volts, the differential amplifier being responsive to the output of the optical sensor when or where no medium is present, and applying the obtained output of the differential amplifier to the predetermined formula, which is stored in the storage means, so as to compute a digital value of voltage to next be applied to the reference input terminal of the differential amplifier, and then applying the computed digital value to the D/A converter.
Such use of the A/D converter, D/A converter and CPU simplifies the hardware configuration, and facilitates the software control of the media detection device, also improving the versatility and flexibility of the control.